items: [ ],
};
let action = this._actions[action_id];
- let item, target, destroyId, specificSignalId;
+ let target, destroyId, specificSignalId;
+
+ let item = new PopupMenuItem(label);
if (action.state) {
// Docs have get_state_hint(), except that the DBus protocol
// always returns null
// Funny :)
- item = new PopupMenuItem(label);
-
switch (String.fromCharCode(action.state.classify())) {
case 'b':
action.items.push(item);
}
} else {
target = model.get_item_attribute_value(index, Gio.MENU_ATTRIBUTE_TARGET, null);
- item = new PopupMenuItem(label);
action.items.push(item);
specificSignalId = item.connect('activate', Lang.bind(this, function() {
this.actionGroup.activate_action(action_id, target);